#!/bin/bash

# 获取 Conda 的 base 路径
CONDA_BASE=$(conda info --base)

# 打开第一个终端，执行 ./setue4.sh
gnome-terminal -- bash -c "source $CONDA_BASE/etc/profile.d/conda.sh; ./setue4.sh; exec bash"
sleep 3
# 打开第二个终端，激活 Conda 环境并运行 airsim_ros2_pkg 的 launch 文件
gnome-terminal -- bash -c "source $CONDA_BASE/etc/profile.d/conda.sh; conda activate airsim; ros2 launch airsim_ros2_pkg airsim_ros2_launch.py; exec bash"
sleep 3
# 打开第三个终端，运行 airsim_target_point 的 launch 文件
gnome-terminal -- bash -c "source $CONDA_BASE/etc/profile.d/conda.sh; conda activate airsim; ros2 launch airsim_target_point airsim_target_point_launch.py; exec bash"
sleep 3
# 打开第四个终端，运行 control_pid_node
gnome-terminal -- bash -c "source $CONDA_BASE/etc/profile.d/conda.sh; conda activate airsim; ros2 run airsim_control_pid control_pid_node; exec bash"

